#pragma comment(linker, "/STACK:10000000")
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#include <cassert>
#include <string>
#include <cstring>
#define ldb long double
#define LL long long
#define fi first
#define se second
#define fill(a, c) memset(a, c, sizeof(a))
#define sqr(a) ((a) * (a))
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
const ldb LDINF = 9128739847123.00;
const ldb eps = 1e-9;
const int INF = 1 << 30;
const ldb pi = fabsl(atan2(0.0, -1.0));
using namespace std;
            
class Point 
{
	public:
		ldb x, y;
		ldb ang()
		{
			return atan2(y, x);
		}
};

inline Point operator - (const Point &p1, const Point &p2)
{
	Point p;
	p.x = p1.x - p2.x;
	p.y = p1.y - p2.y;
	return p;
}        
inline ldb operator ^ (const Point &p1, const Point &p2)
{
	return p1.x * p2.y - p2.x * p1.y;
}


Point p[100010];
ldb ang[100010];
int n, q;
Point c;

ldb MakeFrom(ldb from, ldb a)
{
	a -= from;
	if (a < -eps) a += 2 * pi;
	return a;
}

void Load()
{
	cin >> q;
//	reverse(p, p + n);
}

int find(ldb a)
{
	int l = 0;
	int r = n - 1;
	int mid;
	int res = -1;
	while (l <= r)
	{
		mid = (l+ r) / 2;
		if (ang[mid] < a + eps)
		{
			res = mid;
			l = mid + 1;
		}
		else r = mid - 1;
	}
	return res;
}

set <ldb> all;

void Solve()
{
	int i;
	int xx, yy;
	for (i = 0; i < 3; i++)
	{
		scanf("%d%d%d", &t, &xx, &yy);
		p[i].x = xx;
		p[i].y = yy;
		c.x += p[i].x / (ldb)3;
		c.y += p[i].y / (ldb)3;
	}
	if (((p[1] - p[0]) ^ (p[2] - p[0])) < -eps)
	{
		swap(p[2], p[0]);
	}
	ldb initang = (p[0] - c).ang(), ang;
	for (i = 0; i < n; i++)
	{
		ang = MakeFrom(initang, (p[i] - c).ang());
		all.push_back
	}
	Point q;
	ldb beta;
	int xx, yy;
	int cnt = 0;
	int j;
	p[n] = p[0];
	for (i = 0; i < m; i++)
	{
		scanf("%d%d", &xx, &yy);
		q.x = xx, q.y = yy;
		if (fabsl(q.x - c.x) < eps && fabsl(q.y - c.y) < eps)
		{
			cnt++;
			continue;
		}
		beta = MakeFrom(initang, (q - c).ang());
		j = find(beta);
		if (((p[j + 1] - p[j]) ^ (q - p[j])) > -eps)
		{
			cnt++;
		}
	}
}

#define file "theodore"
int main()
{
	freopen(file".in", "rt", stdin);
	freopen(file".out", "wt", stdout);
	Load();
	Solve();
	return 0;
}